// pages/myrisemoney/myrisemoney.js
Page({

  /**
   * 页面的初始数据
   */
  data: {
    liangmibox: 1,
    moneybox: 1,
    notLeft: false,
    current: 0,
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {

  },

  goleft:function(){
    this.setData({
      notLeft: false,
      current: 0
    })
  },
  goright: function () {
    this.setData({
      notLeft: true,
      current: 1
    })
  },
  changecurrent:function(e){
    console.log()
    if (e.detail.current == 0){
      this.setData({
        notLeft: false,
      })
    } else if (e.detail.current == 1){
      this.setData({
        notLeft: true,
      })
    }
  },

  // 量米充值选择
  switchLiangmi: function (e) {
    var that = this;
    that.setData({
      liangmibox: parseInt(e.currentTarget.id)
    })
  },

  // 零钱充值选择
  switchMoney:function(e){
    var that = this;
    that.setData({
      moneybox: parseInt(e.currentTarget.id)
    })
  },

  // 提现
  spend:function(){
    wx.navigateTo({
      url: '../spend/spend',
    })
  },
})